// 跨组件传参数
import { createContext } from 'react';

const MyContext = createContext<boolean | undefined>(undefined);
interface PropsType {
    size: boolean, children: React.ReactNode
}
function MyContextProvider(props: PropsType) {
    const { size, children } = props
    return (
        <MyContext.Provider value={size}>
            {children}
        </MyContext.Provider>

    )
}
export {
    MyContextProvider, MyContext
}